package com.migu.daogenerator.daofactory.ext;

import com.migu.daogenerator.daofactory.AbsObjDaoFactory;

import de.greenrobot.daogenerator.Entity;
import de.greenrobot.daogenerator.Schema;

public class DownloadDaoFactory extends AbsObjDaoFactory
{
	private static final String ENTITY_NAME = "Download";
	private static final String TABLE_NAME = "T_DOWNLOAD";

	@Override
	public void createDaoObject(Schema schema)
	{
		if (schema != null)
		{
			Entity entity = schema.addEntity(ENTITY_NAME);
			entity.setTableName(TABLE_NAME);
			entity.addLongProperty("_id").primaryKey();
			entity.addStringProperty("content_id");
			entity.addStringProperty("chapter_id");
			entity.addStringProperty("url");
			entity.addStringProperty("status");
			entity.addLongProperty("download_size");
			entity.addLongProperty("total_size");
			entity.addStringProperty("mime_type");
			entity.addLongProperty("download_time");
			entity.addStringProperty("speed");
			entity.addStringProperty("charge_mode");
			entity.addStringProperty("is_ordered");
			entity.addStringProperty("has_occured_pause");
			entity.addStringProperty("type");
			entity.addStringProperty("local_path");
			entity.addIntProperty("rate_level");
		}
	}
}
